const getList = {
  resultCode: '0000',
  resultMessage: '成功！',
  data: {
    list: [{
      id: '1',
      accountName: 'zhang',
      accountPassword: '123456',
      accountImg: 'http://img0.imgtn.bdimg.com/it/u=3210732747,2015332957&fm=26&gp=0.jpg',
      accountNick: '张佳兴',
      accountPower: '管理员',
      accountDescription: '张佳兴大傻子',
      createTime: '2019.12.5',
      status: '使用中'
    }]
  }
}

const removeAccount = {
  resultCode: '0000',
  resultMessage: '成功！',
  data: {
    nessage: '删除成功'
  }
}

const addAccount = {
  resultCode: '0000',
  resultMessage: '成功！',
  data: {
    nessage: '添加成功'
  }
}

export default [
  // 获取列表
  {
    url: '/account/getList',
    type: 'get',
    response: config => {
      return getList
    }
  },
  // 新建/修改帐号
  {
    url: '/account/save',
    type: 'get',
    response: config => {
      return addAccount
    }
  },
  // 删除帐号
  {
    url: '/account/delete',
    type: 'get',
    response: config => {
      return removeAccount
    }
  }
]
// import Mock from 'mockjs'

// const data = Mock.mock({
//   'items|30': [{
//     id: '@id',
//     title: '@sentence(10, 20)',
//     'status|1': ['published', 'draft', 'deleted'],
//     author: 'name',
//     display_time: '@datetime',
//     pageviews: '@integer(300, 5000)'
//   }]
// })

// export default [
//   {
//     url: '/table/list',
//     type: 'get',
//     response: config => {
//       const items = data.items
//       return {
//         code: 20000,
//         data: {
//           total: items.length,
//           items: items
//         }
//       }
//     }
//   }
// ]
